<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="shortcut icon" href="../../favicon.ico" type="image/x-icon">
	<title>check_diffing</title>
</head>
<body>
  <div id="test"></div>

  <script type="text/javascript" src="../../js/17/react.development.js" ></script>
  <script type="text/javascript" src="../../js/17/react-dom.development.js"></script>
  <script type="text/javascript" src="../../js/17/babel.min.js"></script>
  <script type="text/javascript" src="../../js/17/prop-types.js"></script>

  <script type="text/babel">
    class Time extends React.Component {
      state = {now:new Date()}

      componentDidMount(){
        setInterval(()=>{
          this.setState({now: new Date()})
        }, 1000)
      }

      render(){
        return (
          <div>
            <div>hello</div>
            <input type="text" />
            <div>现在是: {this.state.now.toDateString()}</div>
            <div>现在是: {this.state.now.toLocaleDateString()}</div>
            <div>现在是: {this.state.now.toTimeString()}</div>
            <div>现在是: {this.state.now.toLocaleTimeString()}</div>
            <div>现在是: {this.state.now.toISOString()}</div>
            <div>现在是: {this.state.now.toString()}</div>
          </div>
        )
      }
    }

    ReactDOM.render(<Time />, document.getElementById('test'));
  </script>
</body>